package br.inf.solutions.apresentacoes.ssp.model.hierarchy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import br.com.vexillum.model.CommonEntityActivated;
import br.com.vexillum.model.annotations.Validate;

@SuppressWarnings("serial")
@Entity
@Table(name="hierarchy_entity_classification")
public class HierarchyClassification extends CommonEntityActivated{
	
	@Validate(notNull=true)
	@ManyToOne(fetch=FetchType.LAZY,optional=false)
	private HierarchyStructType type;
	
	@Validate(notNull=true)
	@Column(nullable=false)
	private String name;

	
	public HierarchyStructType getType() {
		return type;
	}

	public void setType(HierarchyStructType type) {
		this.type = type;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Override
	public String toString() {
		return this.name;
	}
	
}
